package bitcarve.hydra
{
	import bitcarve.hydra.core.CONSTANT.*;
	import bitcarve.hydra.core.track.core.SampleTrack;
	import bitcarve.hydra.ui.timeline.TimelinePanel;
	import bitcarve.hydra.ui.timeline.samples.TrackData;
	
	import flash.display.DisplayObjectContainer;
	import flash.display.Stage;
	import flash.display.StageScaleMode;
	
	public class Engine
	{
		private var timelinePanel:TimelinePanel;
//		private var timelineControl:TimelineControlViewer;
		
		public function Engine(root:DisplayObjectContainer, stage:Stage):void
		{
			ROOT = root;
			STAGE = stage;
			
			STAGE.scaleMode = StageScaleMode.EXACT_FIT;
		}
		
		public function start():void
		{
			timelinePanel = new TimelinePanel();
			ROOT.addChild(timelinePanel);
			
			var testTrack:SampleTrack = new SampleTrack("root", 0, 120);
			TrackData.createRandomColoredChildTracks(100, testTrack);
			timelinePanel.trackProvider = testTrack;
		}
	}
}